package com.bdqn.carrental.dao;

import com.bdqn.carrental.pojo.OrdersEntity;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.ResultType;
import org.apache.ibatis.annotations.Select;
import org.springframework.stereotype.Repository;

import java.util.List;

@Mapper
@Repository
public interface OrdersMapper {
    /*模糊查询*/
/*    @Select("<script>" +
            "SELECT * FROM orders " +
            " WHERE 1=1" +
            "<if test='customer_name!=null'>" +
            " and customer_name LIKE CONCAT('%',#{name},'%')" +
            " </if>" +
            "LIMIT 0,10"+
            "</script>")
    @ResultType(OrdersEntity.class)
    List<OrdersEntity> SelectOrders(@Param("name") String name);*/

    /**
     * 查询信息
     */
    @Select("SELECT * FROM orders")
    @ResultType(OrdersEntity.class)
    List<OrdersEntity> findAll();
}
